package top.aprillie.mamabike.wallet.dao;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import top.aprillie.mamabike.wallet.entity.Wallet;

@Mapper
@Component(value = "walletMapper")
public interface WalletMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Wallet record);

    int insertSelective(Wallet record);

    Wallet selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Wallet record);

    int updateByPrimaryKey(Wallet record);

    /**
     * 根据用户id查询钱包余额
     *
     * @param userId
     * @return
     */
    Wallet selectByUserId(Long userId);
}